import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
import App from './App.vue'
import './assets/css/tailwind.css'

// 导入页面组件
import HomePage from './pages/HomePage.vue'

// 创建路由
const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      name: 'Home',
      component: HomePage
    },
    {
      path: '/chat',
      name: 'Chat',
      component: () => import('./pages/ChatPage.vue')
    },
    {
      path: '/game',
      name: 'Game',
      component: () => import('./pages/GamePage.vue')
    },
    {
      path: '/service',
      name: 'Service',
      component: () => import('./pages/ServicePage.vue')
    },
    {
      path: '/files',
      name: 'Files',
      component: () => import('./pages/FilesPage.vue')
    }
  ]
})

// 创建应用实例
const app = createApp(App)

// 使用路由
app.use(router)

// 挂载应用
app.mount('#app')